package com.unitd.frame.springweb.upload.base;

/**
 * @desc 自定义的文件上传处理过程中的枚举代码信息,用于提示、处理在上传过程中遇到的情况
 * @filename UploadCode.java
 * @copyright www.unitd.com
 * @author Hudan
 * @version 1.0
 * @date 2017/4/10
 */
public enum UploadCode implements IEnum {
	NORMAL(0, "upload success."),
	ILLEGAL_EXT(1, "upload illegal file ext."),
	EXCEPTION(3, "upload exception.");

	private final int key;
	private final String desc;

	private UploadCode(int key, String desc) {
		this.key = key;
		this.desc = desc;
	}

	@Override
	public int key() {
		return this.key;
	}

	@Override
	public String desc() {
		return this.desc;
	}
}